<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Fieldset
    </ui:define>

    <ui:define name="description">
        Fieldset is a panel component with a legend and content.
    </ui:define>

    <ui:param name="documentationLink" value="/components/fieldset"/>
    <ui:param name="widgetLink" value="Fieldset"/>

    <ui:define name="implementation">
        <div class="card">
            <h:form>
                <p:growl id="msgs" showDetail="true" skipDetailIfEqualsSummary="true"/>

                <h5 class="mt-0">Regular</h5>
                <p:fieldset legend="Header">
                    <p class="m-0">
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
                        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
                        dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                    </p>
                </p:fieldset>

                <h5>Toggleable</h5>
                <p:fieldset legend="Header" toggleable="true" toggleSpeed="500">
                    <p:ajax event="toggle" listener="#{fieldsetView.handleToggle}" update="msgs"/>
                    <p class="m-0">
                        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
                        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum 
                        dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
                    </p>
                </p:fieldset>
            </h:form>
        </div>
    </ui:define>

</ui:composition>
